package com.isprint.jslx.common;

import com.jfinal.kit.Prop;
import com.jfinal.kit.PropKit;


/**
 * Created by ydw on 2017/7/14.
 */
public class CommonProperties {
    private static Prop common = PropKit.use("config/common.properties");
    /**
     * 基于Cookies的票据服务平台
     */
    public static String UUID_NAME = common.get("uuid_name","jslxuuid");

    /**
     * 获取api接口的Cookie唯一标识
     *
     * @return api接口唯一标识
     */
    public static String getAPIUUIDNAME() {
        return UUID_NAME + "_api";
    }
    /**
     * 配置xna domain 域环境[全局,为MAIN_DOMAIN,API_DOMAIN,QIYE_DOMAIN默认值]
     */
    public static String API_DOMAIN=common.get("api_domain");

    /**
     * 管理员WAP/WEB过期时间
     */
    public static int USERCOOKIEEXPIRETIME=common.getInt("user_time",common.getInt("cook_expire_time",-1));

    public static String USERDOMAIN=common.get("user_domain",common.get("domain",""));

    public static String DOMAIN=common.get("domain","");

    /**
     * Cookie 过期时间[全局,为APICOOKIEEXPIRETIME,BWAPCOOKIEEXPIRETIME,MWAPCOOKIEEXPIRETIME默认值] 单位分钟；默认-1，跟随浏览器关闭而退出
     */
    public static int COOKIEEXPIRETIME=common.getInt("cook_expire_time",-1);

    /**
     * 获取后台管理系统的UUIDName
     */
    public static String getUSERUUIDNAME() {
        return UUID_NAME + "_user";
    }
}
